package net.eascn.babyClone.model
{

	import com.adobe.cairngorm.model.ModelLocator;
	
	import flash.filters.DropShadowFilter;
	
	import mx.collections.ArrayCollection;
	import mx.collections.XMLListCollection;
	import mx.core.IFlexDisplayObject;
	
	import net.eascn.babyClone.view.WizardView;
	import net.eascn.babyClone.vo.AlbumVO;


	[Bindable]
	public class ModelLocator implements com.adobe.cairngorm.model.ModelLocator
	{
		private static var modelLocator : net.eascn.babyClone.model.ModelLocator;

		//-----------------------------------------------------------
		public static function getInstance():net.eascn.babyClone.model.ModelLocator
		{
			if ( modelLocator == null )
				modelLocator = new net.eascn.babyClone.model.ModelLocator();

			return modelLocator;
		}

		//-----------------------------------------------------------
		public function ModelLocator():void
		{
			if ( net.eascn.babyClone.model.ModelLocator.modelLocator != null )
				throw new Error( 'Only one ModelLocator instance should be instantiated' );
		}

		// MODELS ===================================================
		
		public var borderDefined:Object= {};
		
		public var selectAlbum:AlbumVO;
		
		
		public var selectAlbumTemplateXML:XML = null;
		
		public var currentAlbumXML:XML = null;
		public var currentPageXML:XML = null;
		
		
		public var selectPhotoList:ArrayCollection = new ArrayCollection();
		
		public var photoList:ArrayCollection = new ArrayCollection();
		
		public var backgroundList:ArrayCollection = new ArrayCollection();
		
		public var layoutList:ArrayCollection  = new ArrayCollection();
		
		public var currentRuntimePages:Array=  [];
		
		
		public var albumDefinedList:ArrayCollection = new ArrayCollection();
		
		
		public var albumDefinedListXML:XMLListCollection= new XMLListCollection();
		
		public var currentAlbum:AlbumVO = new AlbumVO();
		
		public var filter:Array = [new DropShadowFilter(0,0,0,1,7,7)];
		
		public var currentRightColumnIndx:int = 0;
		
		public var popWizard:IFlexDisplayObject = new WizardView();
		
		public var popTextEditForm:IFlexDisplayObject;
		
		public var popWizardSelectChildIndex:int =0;
		
	}
}